home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news2.new-york.net!not-for-mail
- From: Daniel Oppenheimer <daniel@yoga.com>
- Subject: Beginner question on alternatives to fgetc and realloc
- Content-Type: text/plain; charset=us-ascii
- X-Nntp-Posting-User: (Unauthenticated)
- Content-Transfer-Encoding: 7bit
- Message-ID: <30F109F5.13A9@yoga.com>
- X-Mailer: Mozilla 2.0b4 (WinNT; I)
- Mime-Version: 1.0
- X-Nntp-Posting-Host: 140.186.69.3
- Date: Mon, 8 Jan 1996 12:11:33 GMT
-
- I am a beginner. I am integrating several c functions into a
- c++ program. These c functions are member functions in my c++
- program. As the functions exist in c, they use fgetc within a
- while loop to copy one character string into another. And
- realloc is used in conjunction with malloc to dynamically
- reallocate memory. Is there a c++ alternative to fgetc? If so
- is it always better to use it? If it is not always better to
- use it, under what conditions is it better? Also, is there a
- more elegant and economic solution in c++ to realloc?
-
- Any help would be appreciated.
-
- Thank you.
-
- Dan
-